home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ Oct 89 / Z0086-How to detect poten-Oct89 < prev    next >
Encoding:
Text File  |  1989-10-16  |  1.5 KB  |  36 lines  |  [TEXT/GEOL]

  1. Item    7693103                         16-Oct-89        11:27
  2.  
  3. From:   D2086                           Efficient Field Svc, C Faith,PRT
  4.  
  5. To:     MACAPP.TECH$                    MACAPP Tech
  6.  
  7. Sub:    How to detect potential Obj's
  8.  
  9. Is there any way to tell at runtime what potential objects are defined and
  10. hence could be created?  Is there a list somewhere that I could gain access to?
  11. It seems that this might be possible given all the additional functionality
  12. that TObject now posseses, instantiation of objects from resources etc.
  13.  
  14. Specifically I would like to be able to find all the objects that are
  15. descendants of a specific object, TDocument for example.
  16.  
  17. One further question:
  18.  
  19. Is there any way to invoke a method of an object that is defined without
  20. creating and initializing an object of that type.
  21.  
  22. I know the code will be out there regardless of whether you create an object or
  23. not.  It is not that big of a deal to create each object and then quickly free
  24. it but this seems wasteful if all I want to do is invoke a method.  I realize
  25. that this is probably bad form, but I am at least curious if it can be done.
  26.  
  27. I am asking these questions because I want to have a method of TMyApplication
  28. that will call a certain method of all objects that are descendants of
  29. TDocument.  I don't want to have to change this method every time I add another
  30. TDocument descendant.  I would like it to be able to call any such TDocument
  31. descendants automatically.
  32.  
  33. - Curtis Faith
  34.  
  35.  
  36.